export const storage = {
    set(key, val) {
        window.localStorage.setItem(key, JSON.stringify(val));
    },
    get(key) {
        let val = window.localStorage.getItem(key);
        if (val) {
            return JSON.parse(val);
        }
        return null;
    },
    clear(key) {
        window.localStorage.removeItem(key);
    }
}
